package cn.tedu.net.collection.oopstatic;
//本类用于测试静态的调用关系
public class Test2_Static2 {
    public static void main(String[] args) {
        Teacher.eat();
    }
}
class Teacher {
 String name;
 static int age;
 public void teach(){
     //普通资源可以调用静态资源
     System.out.println(age);
     sleep();
     System.out.println("正在教学ing....");
 }
 public static void eat(){
     //静态资源不能调用普通资源
//     System.out.println(name);
//     teach();
     System.out.println("扶朕起来还能干饭~~~~~");
 }
 public static void sleep(){
     //静态资源可以调用静态资源
     System.out.println(age);
     eat();
     System.out.println("再累也要好好休息哦~");
 }
}